﻿using System.Collections.Generic;
using ProtoBuf;
namespace PnJ.Aliyun.OTS.Models
{
    /// <summary>
    /// 
    /// </summary>
    [ProtoContract(Name = "GetRowRequest")]
    public class GetRowRequest
    {
        private List<Column> primaryKey = new List<Column>();
        private List<string> columnsToGet = new List<string>();

        public GetRowRequest()
        {

        }
        public GetRowRequest(string tableName, List<Column> primaryKey)
        {
            this.TableName = tableName;
            this.primaryKey = primaryKey;
        }
        /// <summary>
        /// 要读取的数据所在的表名
        /// </summary>
        [ProtoMember(1, Name = "table_name", IsRequired = true)]
        public string TableName { get; set; }
        /// <summary>
        /// 该行全部的主键列
        /// </summary>
        [ProtoMember(2, Name = "primary_key", IsRequired = true)]
        public List<Column> PrimaryKey { get { return primaryKey; } set { primaryKey = value; } }
        /// <summary>
        /// 需要返回的全部列的列名
        /// </summary>
        [ProtoMember(3, Name = "columns_to_get")]
        public List<string> ColumnsToGet { get { return columnsToGet; } set { columnsToGet = value; } }
    }
}
